<% @page_title = "最新灾情 | 多背一公斤 - 灾后学校重建计划" -%>

<% content_for :sidebar do -%>
  <%= link_to image_tag("/images/new_camp.gif"), {:controller => "/dizhen/schools", :action => "new_camp"}, :class=> "img" %>
  <h2 class="pink">地震灾区 <%= title_suffix %></h2>
  <%= render :partial => "/dizhen/shared/disasters" %>

<% end -%>


<h1>灾区最新学校信息</span></h1>

<p style="text-align:center; font-size:16.8px; line-height:32px">
  <span style="font-weight:bold;font-size:24px; color:red">16</span>个受灾地区<br />
  <span style="font-weight:bold;font-size:24px; color:red">2000</span>多所中小学校<br />
  请发布你知道的学校消息或照片
</p>

<h2>全部消息 <%= title_suffix %>(<%= link_to "更多消息", {:controller => 'schools', :action => 'comments'}, :class => 'h2l' %>)</h2>
<div class="uml">
  <ul class="mbt">
    <% @comments.each do |cmt| -%>
    <li class="mbtl"><%= avatar_for cmt.user, "large" %></li>
    <li class="mbtrdot">
      <%= link_to_user_page cmt.user, :target => '_blank' %> <span class="tip"><%= cmt.created_at.to_date %>写了关于<%= link_to_school_page cmt.school, {:target => '_blank'} %>的消息</span>
      <%= simple_format truncate(cmt.content, 60) %>
    </li>
    <% end -%>
  </ul>
</div>

<h2>学校照片 <%= title_suffix %>(<%= link_to "更多照片", {:controller => 'schools', :action => 'photos'}, :class => "h2l" %>)</h2>
<% @photos.each do |photo| -%>
  <dl class="obp">
    <dt><%= link_to image_tag(photo.public_filename(:small), :style=> "float:left; margin:3px"), school_url(photo.school.id), :target => '_blank' %></dt>
    <dd><%= link_to_school_page photo.school, :target => '_blank' %>&nbsp;&nbsp;<span class="tip">上传于<%=  photo.created_at.to_date %></span>
    </dd>
  </dl>
<% end -%>
<div class="clear"></div>

